home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1997 / HAM Radio 1997.iso / vcls / dropfile / dragdrop.pas < prev    next >
Pascal/Delphi Source File  |  1996-04-08  |  838b  |  43 lines

  1. unit Dragdrop;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, Dropfile, ExtCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     DropFile1: TDropFile;
  12.     Memo1: TMemo;
  13.     Panel1: TPanel;
  14.     ComboBox1: TComboBox;
  15.     procedure DropFile1DropFile(Sender: TObject);
  16.     procedure ComboBox1Change(Sender: TObject);
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. procedure TForm1.DropFile1DropFile(Sender: TObject);
  31. begin
  32.   combobox1.items := dropfile1.filelist;
  33.   combobox1.itemindex := 0;
  34.   combobox1change(self);
  35. end;
  36.  
  37. procedure TForm1.ComboBox1Change(Sender: TObject);
  38. begin
  39.   memo1.lines.loadfromfile(combobox1.items[combobox1.itemindex]);
  40. end;
  41.  
  42. end.
  43.